﻿@model IEnumerable<GYMONE.Models.MemberRegistrationDTO>

@using GridMvc.Html
@{
    ViewBag.Title = "Member Registration Details";
}



<link href="@Url.Content("~/Content/Gridmvc.css")" rel="stylesheet" />
<link href="~/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
<script src="@Url.Content("~/Scripts/jquery-1.9.1.min.js")"></script>
<script src="@Url.Content("~/Scripts/gridmvc.min.js")"></script>
<link href="~/Content/Site.css" rel="stylesheet" />


<div class="container">
     <div class="clearfix"></div>
    <fieldset>
        <legend class="legend">Member Registration Details</legend>

        <div class="panel">

            <div class="panel-body">


                <div>
                    @Html.ActionLink("Create Member", "Create", "RegisterMember", new { @class = "btn btn-info btn-pressure" })
                </div>

             <div class="clearfix"></div>

                @Html.Grid(Model).Columns(columns =>
                    {

                        columns.Add(c => c.MemberNo).Titled("MemberNo").Filterable(true).Encoded(false)
        .Sanitized(false).SetWidth(50);
                        columns.Add(c => c.FullName).Titled("FullName").Filterable(true).Encoded(false)
        .Sanitized(false).SetWidth(50);

                        columns.Add(c => c.JoiningDate).Titled("JoiningDate")
       .Sanitized(false).Format("{0:dd/MM/yyyy}").SetWidth(50);
                        columns.Add(c => c.DOB).Titled("DOB").Filterable(true).Encoded(false)
      .Sanitized(false).Format("{0:dd/MM/yyyy}").SetWidth(50);
                        columns.Add()
        .Encoded(false)
        .Sanitized(false)
        .SetWidth(20)
        .RenderValueAs(o => Html.ActionLink("Edit", "Edit", new { MemID = o.MemID })).Titled("Edit");
                        columns.Add()
   .Encoded(false)
   .Sanitized(false)
   .SetWidth(30)
   .RenderValueAs(o => Html.ActionLink("Delete", "Delete", new { MemID = o.MemID }, new { onclick = "return confirm('Are you sure you wish to delete this Member Rgistration ?');" })).Titled("Delete");

                    }).WithPaging(10).Sortable(true)

            </div>
        </div>

    </fieldset>

</div>
